#!/bin/env	python

# use yield and (yield)
def print_matches(matchtext):
     print "Looking for", matchtext
     while True:
          line = (yield)
          if matchtext in line:
               print line

match = raw_input("Please input the match text:")
c = print_matches(match)
c.next()
c.send("hello, sheng yi")
c.send("nothing")
